package Test;
import S_O_R_T.*;
import java.util.*;
public class SortTest {
    public static void main(String[] args){
         Sort m=new QuickSort();
         int b;
    	 Scanner reader=new Scanner(System.in);
    	 do{
    	 System.out.print("请输入一个正整数：");
    	 b=reader.nextInt();
    	 }while(b<=0);
    	 System.out.println("本程序将生成"+b+"个随机的正整数(0~99)");
    	 int a[]=new int[b];
    	 for(int i=0;i<b;i++)
    		 a[i]=(int)(Math.random()*100);
    	 System.out.println("随机生成的正整数如下：");
    	 for(int i=0;i<b;i++)
    		 System.out.print("  "+a[i]);
    	 System.out.println("");
    	 System.out.println("经过快速排序后的正整数如下：");
         m.quicksort(a,0,a.length-1);
    	 for(int i=0;i<a.length;i++)
    		 System.out.print("  "+a[i]);
    }
}
